-- GENERATED SPELL FOR [Grom'thar the Thunderbringer] --


function spell0_27002(pUnit, Event) --@Magnataur Charge,n/a--
pUnit:FullCastSpellOnTarget(52167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27002', 3306, 1)
end

function spell1_27002(pUnit, Event) --@Thunder,Self--
pUnit:FullCastSpellOnTarget(52166,pUnit)
pUnit:RegisterEvent('Sorts_27002', 536, 1)
end

function Sorts_27002(pUnit, Event)
local choix_sorts_27002 = math.random(0, 1)
if choix_sorts_27002 == 0 then
pUnit:RegisterEvent('spell0_27002', 1, 1)
end
if choix_sorts_27002 == 1 then
pUnit:RegisterEvent('spell1_27002', 1, 1)
end
end

function mob27002_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27002', math.random(1500, 3000), 1)
end

function mob27002_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27002_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27002_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27002, 1, 'mob27002_Action')
RegisterUnitEvent(27002, 2, 'mob27002_Leave')
RegisterUnitEvent(27002, 3, 'mob27002_Kill')
RegisterUnitEvent(27002, 4, 'mob27002_Die')
